'use strict';
const db = uniCloud.database()
const userDB = db.collection('cc_user')

exports.main = async (event, context) => {
	//event为客户端上传的参数
	// console.log('event : ', event)
	// userDB.add({
	// 	username: "admin",
	// 	password: "123456"
	// })
	// //返回数据给客户端
	// return {
	// 	code: 200,
	// 	message: "用户创建成功！"
	// }
};

exports.create = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	userDB.add({
		username: "admin",
		password: "admin123"
	})
	//返回数据给客户端
	return {
		code: 200,
		message: "用户创建成功！"
	}
};